import scala.io.StdIn
object helloworld {
  def sum(x:Int,y:Int):Int= {
    var num = 0;
    for (i <- x to y) {
      num += i;
    }
    num
  }
  def main(args: Array[String]) {
  val x,y=readInt();
  print(sum(x,y))
}
}